package com.stage.singleton;

/**
 * Created by Stage on 2017/3/17.
 */
//懒汉式
public class LazySingleton {

    private static LazySingleton singleton = null;

    private LazySingleton() {
        // ToDo  do somthing here
    }

    public static synchronized LazySingleton getInstance() {
        return singleton == null ? singleton = new LazySingleton() : singleton;
    }
}